home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Exchange
/
CD Exchange - Volume 1.iso
/
utils
/
misc
/
ace
/
ace-2.0.lha
/
PRGS.lha
/
Turtle
/
dragon.b
< prev
next >
Wrap
Text File
|
1994-01-10
|
680b
|
46 lines
'..Dragon Curve
'..(recursive).
sub dragon(depth,side)
if depth = 0 then
Forward(side)
else
if depth > 0 then
dragon(depth-1,side)
turnRight(90)
dragon(-(depth-1),side)
else
dragon(-(depth+1),side)
turnRight(270)
dragon(depth+1,side)
end if
end if
end sub
window 1,"Dragon Curve",(0,0)-(640,250)
color 2,1
another$="Y"
while another$="Y"
cls
locate 1,1
input "Enter depth (try 10): ",depth
input "Enter sides (try 3): ",sides
cls
penup
setxy 320,125
pendown
dragon(depth,sides)
locate 26,1
print "another (y/n)?"
another$=""
while another$<>"Y" and another$<>"N"
another$=ucase$(inkey$)
wend
wend
window close 1